package com.hxzy.controller.mapstruct;

import com.hxzy.controller.user.req.UserAddReq;
import com.hxzy.controller.user.req.UserEditReq;
import com.hxzy.controller.user.resp.UserResp;
import com.hxzy.entity.UserinfoWy;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @Author wy
 * @Description TODO
 * @Date 2023/8/27 9:30
 * @Version 1.0
 */
@Mapper
public interface UserConvert {
    UserConvert INSTALCE= Mappers.getMapper(UserConvert.class);

    /**
     * 把UserAddReq转换为UserinfoWy
     * @param req
     * @return
     */
    UserinfoWy  convert(UserAddReq  req);


    UserResp convert(UserinfoWy entity);

    UserinfoWy convert(UserEditReq req);

}
